//
//  MuchDoorBusinessPch.h
//  MuchDoorBusiness
//
//  Created by 陈友文 on 2019/6/18.
//  Copyright © 2019 Ccc. All rights reserved.
//

#ifndef MuchDoorBusinessPch_h
#define MuchDoorBusinessPch_h
#import "UIButton+NormalBtn.h"
#import "UIView+CYWExtension.h"
#import <Masonry.h>
#import "UIAlertController+CYWAlertController.h"
#import "CYW_NetworkingManager.h"
#import "MBProgressHUD+CYW_ProgressHUD.h"
#import "UIView+CYWExtension.h"
#import <MJExtension/MJExtension.h>
#import "UIImage+ResizableImage.h"
#import "UIBarButtonItem+Extension.h"
#import <MJRefresh.h>
#import <lottie-ios/Lottie/Lottie.h>
#import "UILabel+CYWLabel.h"
#import "MyMD5.h"
#import "UIFont+Additions.h"
#import "NSString+AES.h"
#import "GetUserInfo.h"
#import <SVProgressHUD.h>
#import "AAGlobalMacro.h"
#import <Lottie/Lottie.h>
#import "CYWCamareController.h"
#import "CYWConversionTool.h"



//屏幕bounds
#define kScreenBounds [UIScreen mainScreen].bounds
//屏幕宽
#define kScreenWidth [UIScreen mainScreen].bounds.size.width
//屏幕高
#define kScreenHeight [UIScreen mainScreen].bounds.size.height
//当前手机版本
#define kCurrentVersion [UIDevice currentDevice].systemVersion.floatValue
//rgb
#define kBarColor(r,g,b,a) [UIColor colorWithRed:r / 256.0 green:g / 256.0 blue:b / 256.0 alpha:a]
//随机颜色
#define kRandomColor [UIColor colorWithRed:arc4random_uniform(255)/ 256.0 green:arc4random_uniform(255) / 256.0 blue:arc4random_uniform(255) / 256.0 alpha:1.0]
//RGB
#define RGBA(r, g, b, a)    [UIColor colorWithRed:r/255.0f green:g/255.0f blue:b/255.0f alpha:a]
#define RGB(r, g, b)     RGBA(r, g, b, 1.0f)

//导航栏高度
#define kNavHeight self.navigationController.navigationBar.bounds.size.height + [[UIApplication sharedApplication] statusBarFrame].size.height
//tabbar高度
#define kTarBarHeight self.tabBarController.tabBar.bounds.size.height

//屏幕比
#define kWidth_Scale    [UIScreen mainScreen].bounds.size.width/375.0f
#define kHeight_Scale   [UIScreen mainScreen].bounds.size.height/667.0f



#define kIs_iphone (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)

/*刘海机型*/
#define kIs_iPhoneX ({ \
BOOL ipX = NO; \
if (@available(iOS 11.0, *)) { \
    UIWindow *window = [[UIApplication sharedApplication].windows firstObject]; \
    ipX = window.safeAreaInsets.bottom > 0; \
} \
  ipX; \
})
/*状态栏高度*/
#define kStatusBarHeight (CGFloat)(kIs_iPhoneX?(44.0):(20.0))
/*导航栏高度*/
#define kNavBarHeight (44)
/*状态栏和导航栏总高度*/
#define kNavBarAndStatusBarHeight (CGFloat)(kIs_iPhoneX?(88.0):(64.0))
/*TabBar高度*/
#define kTabBarHeight (CGFloat)(kIs_iPhoneX?(49.0 + 34.0):(49.0))
/*顶部安全区域远离高度*/
#define kTopBarSafeHeight (CGFloat)(kIs_iPhoneX?(44.0):(0))
/*底部安全区域远离高度*/
#define kBottomSafeHeight (CGFloat)(kIs_iPhoneX?(34.0):(0))
/*iPhoneX的状态栏高度差值*/
#define kTopBarDifHeight (CGFloat)(kIs_iPhoneX?(24.0):(0))
/*导航条和Tabbar总高度*/
#define kNavAndTabHeight (kNavBarAndStatusBarHeight + kTabBarHeight)





#define kWeakSelf __weak typeof(self) weakSelf = self;


#ifdef DEBUG
#define NSLog(...) NSLog(__VA_ARGS__)
#define debugMethod() NSLog(@"%s", __func__)
#define k_OpenLSSafe YES
//#define kBaseURL @"https://test05.sensorte.com"


#else
#define NSLog(...)
#define debugMethod()
#define k_OpenLSSafe NO

#endif

#endif /* MuchDoorBusinessPch_h */
